var shareBox=document.getElementById("shareBox"),
	navIndexItem=document.getElementById("nav-index-item"),
	navLogoBox=document.getElementById("nav-logo-box"),
	$navRight=$("nav").find("ul").eq(1),
	$navLeft=$("nav").find("ul").eq(0),
	$milkBorder=$("#milk-border");
function scrollChange(){
	var scrollTop=$(this).scrollTop();
		console.log(scrollTop);
	if(scrollTop==0){
		if(recordUp){$("nav").hide().fadeIn(); recordUp=false;}
		recordDown=true;
		$navRight.removeClass("pull-left").addClass("pull-right");
		$navLeft.css("margin-left",0);
		shareBox.style.display="block";
		navIndexItem.style.display="none";
		navLogoBox.style.display="block";
		$milkBorder.removeClass("nav-border-right");				
	}
	else if(scrollTop>80){
		if(recordDown){$("nav").hide().fadeIn(); recordDown=false;}
		recordUp=true;			
		$navRight.removeClass("pull-right").addClass("pull-left");
		$navLeft.css("margin-left",80);
		shareBox.style.display="none";
		navIndexItem.style.display="block";
		navLogoBox.style.display="none";		
		$milkBorder.addClass("nav-border-right");
//		if(flashStatus){
//			if(scrollTop>450){
//				document.getElementById("myFlash").Play();
//				setTimeout(function(){
//					$("#myFlashText").fadeIn("slow");
//				},0);
//				flashStatus=false;
//			}
//		}
		
	}
}
function bottlePosi(){
	var posi=$(this).scrollTop()+230;
	//document.getElementById("bottle-wrapper").style.top=posi+"px";
}
$("#weibo").hover(function(){
	$("#weibo_pop").fadeIn("fast");
},function(){
	$("#weibo_pop").fadeOut("fast");
})
$("#weixin").hover(function(){
	$("#weixin_pop").fadeIn("fast");
},function(){
	$("#weixin_pop").fadeOut("fast");				
})
